package com.clouddot.baipai.module;


import com.clouddot.baipai.contract.IMainFragmentContract;
import com.clouddot.baipai.contract.INewsFragmentContract;
import com.clouddot.baipai.model.MainFragmentModel;
import com.clouddot.baipai.model.NewsFragmentModel;
import com.clouddot.baipai.presenter.MainFragmentPresenter;
import com.clouddot.baipai.presenter.NewsFragmentPresenter;

import dagger.Module;
import dagger.Provides;

@Module
public class NewsFragmentModule {

    private INewsFragmentContract.IView mView;

    public NewsFragmentModule(INewsFragmentContract.IView view) {
        mView = view;
    }

    @Provides
    public INewsFragmentContract.IPresenter providerPresenter() {
        return new NewsFragmentPresenter(mView, new NewsFragmentModel(mView.getContext()));
    }
}
